// 工作统计

import request from '@/utils/request'

// 查询一级部门列表
export function getFirstLevelDepList(data) {
  return request({
    url: '/statistics/listOneLevelDept',
    method: 'post',
    data
  })
}

// 根据一级部门id查询二级部门
export function getSecondLevelDepList(data) {
  return request({
    url: '/statistics/listTwoLevelDept',
    method: 'post',
    data
  })
}

// 根据部门id查询组
export function getGroupList(data) {
  return request({
    url: '/statistics/listGroup',
    method: 'post',
    data
  })
}

// 按部门工作统计
export function byDept(data) {
  return request({
    url: '/statistics/workingHours/byDept',
    method: 'post',
    data
  })
}

// 按组工作统计
export function byGroup(data) {
  return request({
    url: '/statistics/workingHours/byGroup',
    method: 'post',
    data
  })
}

// 按成员工作统计
export function byUser(data) {
  return request({
    url: '/statistics/workingHours/byUser',
    method: 'post',
    data
  })
}

// 部门下员工的自动接单开关
export function switchByDept(data) {
  return request({
    url: '/autoReceive/switchByDept',
    method: 'post',
    data
  })
}

// 组下员工自动接单开关
export function switchByGroup(data) {
  return request({
    url: '/autoReceive/switchByGroup',
    method: 'post',
    data
  })
}

export function switchByUser(data) {
  return request({
    url: '/autoReceive/switchByUser',
    method: 'post',
    data
  })
}
